package config

type WebConfig struct {
	Name          string      `mapstructure:"name" json:"name"`
	Host          string      `mapstructure:"host" json:"host"`
	Port          int         `mapstructure:"port" json:"port"`
	Tags          []string    `mapstructure:"tags" json:"tags"`
	UserSrvConfig SrvConfig   `mapstructure:"user_srv" json:"user_srv"`
	JWT           JWTConfig   `mapstructure:"jwt" json:"jwt"`
	Redis         RedisConfig `mapstructure:"redis" json:"redis"`
	Consul        Consul      `mapstructure:"consul" json:"consul"`
	Oss           Oss         `mapstructure:"oss" json:"oss"`
}

type SrvConfig struct {
	Name string `mapstructure:"name" json:"name"`
	Host string `mapstructure:"host" json:"host"`
	Port int    `mapstructure:"port" json:"port"`
}

type JWTConfig struct {
	SignKey string `mapstructure:"key" json:"key"`
}

type RedisConfig struct {
	HOST string `mapstructure:"host" json:"host"`
	Port int    `mapstructure:"port" json:"port"`
}

type Consul struct {
	Host string `mapstructure:"host" json:"host"`
	Port int    `mapstructure:"port" json:"port"`
}

type Nacos struct {
	Host      string `mapstructure:"host"`
	Port      uint64 `mapstructure:"port"`
	Namespace string `mapstructure:"namespace"`
	User      string `mapstructure:"user"`
	Password  string `mapstructure:"password"`
	DataId    string `mapstructure:"dataid"`
	Group     string `mapstructure:"group"`
}

type Oss struct {
	ApiKey      string `mapstructure:"key" json:"key"`
	ApiSecrect  string `mapstructure:"secrect" json:"secrect"`
	Host        string `mapstructure:"host" json:"host"`
	CallBackUrl string `mapstructure:"callback_url" json:"callback_url"`
	UploadDir   string `mapstructure:"upload_dir" json:"upload_dir"`
}
